{	Problem: http://codeforces.ru/problemset/problem/33/A
	Verdict: Accepted

}
var n,m,k,i,res,x,y:longint; r:array[1..1001] of longint;
begin
readln(n,m,k);
res:=0;
fillchar(r,sizeof(r),-1);
for i:=1 to n do begin
  readln(x,y);
  if r[x]=-1 then r[x]:=y else
  if r[x]>y then r[x]:=y;
end;
for i:=1 to m do inc(res,r[i]);
if k<res then res:=k;
writeln(res);
readln;
end.